Skip to content

Conversation

@brianacnguyen
Copy link
Contributor

@brianacnguyen brianacnguyen commented Oct 24, 2025

Description

This PR adds full-page views for both Tokens and NFTs to the wallet, providing users with expanded views of their assets with improved navigation and layout.

The changes include:

  • New full-page views for Tokens and NFTs accessible via "View all" buttons
  • Enhanced NFT grid with configurable display limits and full-view mode
  • Improved navigation structure by moving import screens to the main stack
  • Updated component architecture for better reusability and maintainability

Changelog

CHANGELOG entry: Added full-page views for Tokens and NFTs with "View all" navigation buttons

Related issues

Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/DSYS/boards/1888?selectedIssue=DSYS-246

Manual testing steps

Feature: Full-Page Asset Views

  Scenario: User views all tokens
    Given the user is on the Wallet home screen
    When the user clicks "View all tokens" button on the Tokens tab
    Then they should see a full-page view of all their tokens with a back button

  Scenario: User views all NFTs
    Given the user is on the Wallet home screen
    When the user clicks "View all NFTs" button on the NFTs tab
    Then they should see a full-page view of all their NFTs with a back button

  Scenario: User imports tokens
    Given the user is on any screen
    When the user navigates to import tokens
    Then the import screen should not show the bottom navigation bar

  Scenario: User imports NFTs
    Given the user is on any screen
    When the user navigates to import NFTs
    Then the import screen should not show the bottom navigation bar

Screenshots/Recordings

Before

After

Tokens Full View
https://github.com/user-attachments/assets/4b6fe582-d5c8-4e3a-8f8e-132047cc1b9e

NFTs Full View
https://github.com/user-attachments/assets/104b9d20-eb88-429f-9a60-f6475a9eea7d

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Adds a full-page NFTs view with route/navigation and upgrades NftGrid to support full-view layout, "View all NFTs" action, and improved add/import flow, with styles/i18n updates and tests.

  • Wallet/UI:
    • New screen: Views/NftFullView with header/back handling; registered in MainNavigator as Routes.WALLET.NFTS_FULL_VIEW (header hidden).
    • NftGrid (UI/NftGrid/NftGrid.tsx):
      • Adds isFullView, maxItems, and flashListProps support; groups items into 3-column rows via custom NftRow and Tailwind classes.
      • Shows "View all NFTs" button (navigates to Routes.WALLET.NFTS_FULL_VIEW) when maxItems exceeded.
      • Changes add NFT action to navigation.push('AddAsset', { assetType: 'collectible' }).
      • Integrates BaseControlBar layout tweaks and optional full-view padding; removes numColumns.
    • Navigation/Routes: Adds WALLET.NFTS_FULL_VIEW to Routes.ts; registers in MainNavigator and snapshot updated.
  • Styles/I18n:
    • CollectibleMedia.styles: textContainer background switched to colors.background.section.
    • ControlBarStyles: center-aligns controlButtonInnerWrapper.
    • locales/en.json: adds wallet.view_all_nfts.
  • Tests:
    • New NftFullView.test.tsx; expanded NftGrid.test.tsx for full-view, "View all", navigation, and fetching states.

Written by Cursor Bugbot for commit a9c91a4. This will update automatically on new commits. Configure here.

@brianacnguyen brianacnguyen requested a review from a team as a code owner October 24, 2025 21:00
@brianacnguyen brianacnguyen self-assigned this Oct 24, 2025
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@brianacnguyen brianacnguyen added team-design-system All issues relating to design system in Mobile no changelog required No changelog entry is required for this change labels Oct 24, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

name="AddAsset"
component={AddAsset}
options={{ headerShown: false }}
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be moved out to the main stack to work with the new asset full pages. Additionally, it should not have the bottom nav

alignItems: 'center',
justifyContent: 'flex-start',
backgroundColor: colors.background.alternative,
backgroundColor: colors.background.section,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated based on design


const NftGrid = () => {
const navigation = useNavigation();
const NftRow = ({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving to a row approach for better spacing

scrollEnabled: true,
}),
[tw],
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different grid styling based on views

</View>

{/* View all NFTs button - shown when there are more items than maxItems */}
{shouldShowViewAllButton && (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be under a scrolldisabled flashlist, so its fine to stay outside

container: {
flex: 1,
padding: 5,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing padding here for the row approach

return tokensData && Object.keys(tokensData).length > 0;
}, [selectedNetwork, tokenListForAllChains]);

const updateNavBar = useCallback(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this page is moved to the main stack, these are moved to the header below

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: NFT Grid Missing Prop Hides View All Button

The "View all NFTs" button will never be visible because NftGrid is used without the maxItems prop. Looking at the NftGrid component, the view-all button only displays when maxItems is provided and the total collectibles exceed maxItems. In WalletTokensTabView, NftGrid is instantiated without maxItems parameter, making the shouldShowViewAllButton condition always false. This prevents users from accessing the "View all NFTs" feature as described in the PR manual testing scenarios. The code should pass a maxItems prop to limit the display in the tab view (e.g., maxItems={3} or similar) to enable the view-all button functionality.

app/components/Views/Wallet/index.tsx#L518-L522

const selectedInternalAccount = useSelector(selectSelectedInternalAccount);
/**
* Provider configuration for the current selected network
*/

Fix in Cursor Fix in Web


@sonarqubecloud
Copy link

@brianacnguyen brianacnguyen added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit c835647 Oct 28, 2025
85 checks passed
@brianacnguyen brianacnguyen deleted the feat/nfts-full-page branch October 28, 2025 16:03
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Oct 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no changelog required No changelog entry is required for this change release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-L team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants